home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++,comp.os.msdos.programmer
- Path: actrix.gen.nz!kheidens
- From: kheidens@atlantis.actrix.gen.nz (Kris Heidenstrom)
- Subject: Re: Timer (0x1C) Interrupt exactly 18.2 seconds?
- Message-ID: <DnEMuF.DEK@actrix.gen.nz>
- Sender: news@actrix.gen.nz (News Administrator)
- Organization: Actrix - Internet Services
- Date: Mon, 26 Feb 1996 22:37:26 GMT
- References: <4givrv$cim@midland.co.nz> <Dn9FMB.19s.0.sheppard@torfree.net> <4gr0bt$qck@masala.cc.uh.edu>
- X-Nntp-Posting-Host: atlantis.actrix.gen.nz
-
- In article <4gr0bt$qck@masala.cc.uh.edu>,
- Sensarn <txs53132@bayou.uh.edu> wrote:
- > Try this:
- >
- > outp(0x43,0x40);
- > outp(0x3c,0x0b);
- > outp(0x3c,0xe9);
- >
- > The timer now ticks 20 times a second.
-
- Believe it... or not!
-
- At least you have the divisor right. The correct sequence would be:
-
- disable();
- outp(0x43, 0x36); /* or 0x34 instead of 0x36 for mode 2 */
- outp(0x40, 0x0B); /* Loword of divisor */
- outp(0x40, 0xE9); /* Hiword of divisor */
- enable();
-
- But of course speeding up the tick without intercepting int 8
- will cause the DOS time to run fast.
-
- Kris
- --
- Kris Heidenstrom kheidens@actrix.gen.nz Wellington, NZ
- "Silly Pate - Tastes great... Bounces high!" - AWotM
-